/*
 * @Author: deliteam 462085920@qq.com
 * @Date: 2023-11-21 16:38:13
 * @Description:
 */
// https://nuxt.com/docs/api/configuration/nuxt-config

export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: ["@unocss/nuxt", "@pinia/nuxt", "@nuxtjs/color-mode"],
  vue: {
    defineModel: true,
    propsDestructure: true,
  },
  experimental: {
    reactivityTransform: true,
    inlineSSRStyles: false,
  },
  plugins: [{ src: "~/plugins/tools.ts" }],
  app: {
    baseURL: "/", // 默认为'/'  "/generate/" 为ssg路径
    pageTransition: { name: "page", mode: "out-in" },
    head: {
      title: "集舍研造",
      meta: [
        {
          name: "viewport",
          content:
            "width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1",
        },
        { name: "apple-mobile-web-app-capable", content: "yes" },
        { name: "apple-mobile-web-app-status-bar-style", content: "black" },
        { name: "format-detection", content: "telephone=no" },
        { name: "author", content: "佛山市集创舍室内设计有限公司 delisteam" },
        {
          name: "keywords",
          content: "佛山市集创舍室内设计有限公司,建筑,室内设计,集舍研造",
        },
        {
          name: "description",
          content: "佛山市集创舍室内设计有限公司于2015年成立",
        },
      ],
      script: [
        {
          src: "/js/TweenMax.min.js", //https://cdn.bootcdn.net/ajax/libs/gsap/1.19.0/TweenMax.min.js",
        },
        {
          type: "text/javascript",
          src: "https://webapi.amap.com/maps?v=2.0&key=dd51893045d718396a861179ff8afb10&plugin=AMap.Geolocation,AMap.Geocoder,AMap.ControlBar,AMap.ToolBar",
        },
        {
          src: "/js/plugins.js",
          body: true,
        },
        {
          src: "/js/main.js",
          body: true,
        },
      ],
      link: [],
      style: [],
      noscript: [],
    },
  },
  css: [
    "@unocss/reset/tailwind.css",
    "@/styles/reset.scss",
    "@/styles/index.scss",
    "@/styles/animate.min.css",
    "@/styles/iconfont.css",
    "@/styles/font.css",
    "@/styles/modules.scss",
  ],
  colorMode: {
    classSuffix: "",
  },
  routeRules: {
    // 针对路径进行接口转发
    "/dev-api/**": {
      // 开发环境和生产都可以用localhost:3003
      proxy: `http://localhost:3003/**`,
    },
  },
});
